import React from 'react'
import { Route, Routes,Navigate } from "react-router-dom";
import Login from '../views/login/Login';
import Home from '../pages/Home';
import About from '../pages/About';
import Msg from '../pages/Home/Msg/Msg';
import News from '../pages/Home/News/News';
import Detail from '../pages/Home/Msg/Detail/Detail';
const routes=[
  {
    path:'/home',
    element:<Home/>,
    children:[
      {
        path:'msg',
        element:<Msg/>,
        children:[
          {
            path:'detail/:id/:title',
            element:<Detail/>,
          }
        ]
      },
      {
        path:'news',
        element:<News/>
      },
    ]
  },
  {
    path:'/about',
    element:<About/>
  },
  {
    path:'/',
    element:<Navigate to='/home'/>
  },
]
export default routes
  
